Micron Document




Comment (computer programming)
part 20/37 · 66.0 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Although Python does not provide for block commentscite-ref-triple-43-0[43] a bare string literal represented by a triple-quoted string is often used for this purpose.cite-ref-44[44]cite-ref-triple-43-1[43] In the examples below, the triple double-quoted strings act like comments, but are also treated as docstrings:

"""
At the top of a file, this is the module docstring
"""
class MyClass:
"""Class docstring"""
def my_method(self):
"""Method docstring"""

Browser markup

Markup languages in general vary in comment syntax, but some of the notable internet markup formats such as HTML and XML delimit a block comment with <!-- and --> and provide no line comment support. An example in XML:

<!-- select the context here -->
<param name="context" value="public" />

For compatibility with SGML, double-hyphen (--) is not allowed inside comments.

ColdFusion provides syntax similar to the HTML comment, but uses three dashes instead of two. CodeFusion allows for nested block comments.

Double dash

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────